<template>
  <div class="wrapper">
    <template v-for="(item, idx) in homeworkList">
      <h1 :key="idx">作业{{ idx + 1 }}: {{ item }}</h1>
    </template>
  </div>
</template>

<script>
export default {
  name: 'homework',
  mounted() {
    const homeworkList = localStorage.getItem('homeworkList');
    if (homeworkList != null) {
      this.homeworkList.push(...JSON.parse(homeworkList));
    }
  },
  data() {
    return {
      homeworkList: [
        '请写出批发价格契约的供应链利润函数并化简',
        '请写出回购契约的供应链零售商利润函数并化简',
        '请写出销售回扣契约的转移支付函数并化简',
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.wrapper {
  padding: 50px 300px;
}
</style>
